package cn.tedu.spring.eg3;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestShopController {
    @Test
    public void Test01(){
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("cn.tedu.spring.eg3");
        ShopController bean = context.getBean(ShopController.class);
        System.out.println("4.开发者使用阶段");

        /*
        * eg: close方法在接口中没有,只有在具体的实现类中才可以使用
        * */
        context.close();
    }
}
